Plays a text effect on every draw_text call from here until text_effect_stop: words that flash, shake, wave or change color. A text effect is made in the Overlay Effects tab, like a sprite effect, but it changes the words you draw. It is ambient, like font_set and text_palette. Call it every frame, in a Draw event, before the draw_text calls it should reach. text_effect_start(nothing) is text_effect_stop().
Works differently on Game Boy - Text effects play in a plainer form: Typewriter, Drop in, Pop and Jitter in show the letters on time; Wave, Shake and Sway move a text sideways (sprite text also up and down); Bounce hops sprite text; a Tint does nothing; looks that turn or grow letters leave the text plain.
Works differently on Game Boy Color - Text effects play in a plainer form: letters appear one by one, colors change as made, text shakes or ripples sideways; letters never turn or grow.
Works differently on Sega Genesis - The Sega Genesis plays a text effect its own way. This version plays the Tint track (the words' color mixed toward the effect's color, with the effect's timing) and the Wave and the Shake of the Letters track (each letter its own sprite). It does not play the other Letters looks yet and cannot turn, resize, block or fade words, so the other Letters looks and the Stretch, Blocks, See-through, Scale, Rotate and Flip tracks do not show (the build says which effect has one); use Make a sprite from this effect for those.
On other consoles this differs: see Side by side and How the consoles differ.
text_effect_start(effect)| Name | Type |
|---|---|
effect | overlay |
Nothing.
Plays a text effect on every draw_text call from here until text_effect_stop: words that flash, shake, wave, bounce, spin or change color. A text effect is made in the Overlay Effects tab, like a sprite effect, but it changes the words you draw instead of an object. text_effect_start(nothing) is the same as text_effect_stop().
It is ambient, the same shape font_set and text_palette have: you choose it once and every line drawn after it wears it. Call it every frame, in a Draw event, before the draw_text calls it should reach.
text_effect_start(te_doc_flash);
draw_text(8, 8, "WARNING");
text_effect_stop();
draw_text(8, 24, "all clear");The first line flashes white. The second line is drawn in the very same font and keeps the font's own colors.
A text effect has up to six tracks. Every track is optional and has its own way of moving:
Tick Play backwards to run a pulse the other way round: it starts at full strength and falls to nothing (when it repeats, it then jumps back to full). It is grayed out for Stands still, Pulse reverse and Fade back. A "fade in" for words is a fade out with this ticked.
Start after. Every track's way-of-moving row has a Start after box: the number of frames the track waits before it begins. Until then it is not there at all; then it runs its own way of moving from its first frame. 0 starts it with the effect. This is how a shake can start the moment words have landed, or a shudder after a pop: give the pop's track no wait and the shake's track the length of the pop. A track that plays backwards is not there before its start either; then it starts at full strength and falls. Blocks and See-through have no Start after (the screen plays them), and the whole effect has none: only a track can wait. The wait is counted in frames at the normal speed.
| Track | What it does to the words |
|---|---|
| Tint | mixes the letters' colors toward a color, or toward a palette of your project. Give it up to 6 colors and it moves through them in order as the strength rises, reaching the last at full strength (colors or a palette, not both). A white Tint is a flash |
| Letters | moves, turns or resizes the letters one by one, in the look you pick (see \\The Letters looks\\ below). It can wear up to three looks at once, and give the letters a Letter size |
| Blocks | turns the words into big blocks |
| See-through | lets you see through the words |
| Scale | makes the whole line bigger or smaller, as one piece, about the middle of the line (see \\Scale and Rotate\\ below) |
| Rotate | turns the whole line, as one piece, about the middle of the line |
The Letters track has a Look, and each look moves every letter on its own. How strong (1 to 4) says how far the letters go, Speed says how fast (the degrees a frame of the looks that go round; Shake jitters every 8 / Speed frames; Drop in, Jitter in and Pop play in faster with a bigger Speed; 8 is the usual speed, 0 holds the look still), and the track's way of moving (see above) makes the look stronger or weaker as it plays. A look only moves while its track keeps going: with Stands still the look is frozen.
Looks that move the letters
| Look | What you see |
|---|---|
| Wave | a wave runs along the line |
| Shake | every letter jitters |
| Swirl | each letter runs around in a little circle, one after another, like a ripple |
| Tornado | the letters whirl around the middle of the line and climb |
| Circle loop | the whole word rides around a circle, each letter chasing the one before it |
| Bounce | the letters hop up and down one after another, like a ball |
| Drop in | the letters fall in from above one by one and land with a little bounce |
| Scatter | the letters fly apart and come back together |
| Float | the letters drift slowly, each one its own way |
| Sway | the line rocks back and forth like a swinging bridge |
| Jitter in | the letters start scattered and snap into place one by one |
| Typewriter | the letters appear one at a time, like typing (nothing moves or turns) |
Looks that turn or resize the letters
| Look | What you see |
|---|---|
| Spin | each letter turns all the way round, one after another |
| Pop | the letters grow from nothing, get a little too big and settle, one by one |
| Heartbeat | the whole line swells and shrinks like a beating heart |
| Jelly | the letters stretch tall and squash wide |
| Elastic | the whole line stretches out wide, snaps back and rebounds a little; all the letters share one slot |
| Dominoes | the letters tip over to the right one after another, lie a moment and stand back up; a letter uses a slot only while it is tipping |
| Pendulum | each letter hangs from its top and swings, one after another, like a row of hanging signs; one slot for each letter, so it suits short words |
Typewriter plays once, when the effect starts, like Drop in: a letter appears every 4 frames at the usual Speed of 8 (a Speed of 16 types twice as fast), and a track that stands still shows the whole line. How strong does nothing for it. It uses no turn and size slots. In a cutscene Dialogue that types its own letters, the two do not fight: a letter shows once the Dialogue has typed it and the Typewriter has reached it, so whichever is slower decides when it appears. To let the Dialogue do all the typing, use another look. Drop in, Jitter in and Pop play once, from the moment the effect starts, and then the words stand still. Set Stands still as the way of moving, and start the effect again (stop calling text_effect_start for a frame, then call it again) to see it play again. A Speed of 0 or less shows the words as they end up.
More than one look at once. Press Add a look to give the Letters track a second look, and a third. Each look keeps its own strength and speed, and the letters wear them all at the same time: the moves add up, the turns add up and the sizes multiply. Jelly and Tornado together make jelly letters whirling round the line. A letter is hidden while any of its looks hides it (Drop in, Jitter in and Pop). Each look can be used once; the arrows reorder them and the cross takes one off. A single look is saved exactly as it always was.
Letter size. Under the looks, Letter size gives every letter its own size, one after another:
How much (1 to 4) says how much bigger and smaller the letters get (about 15 percent of their size for each point), and the track's pulse scales it. The sizes are rounded to 8 steps, so letters at the same step share one turn and size slot: a line uses at most 8 of them, however long it is. By depth uses up to 4 drawing layers (sprite sort layers) while the line is on screen.
A Scale and a Rotate track act on the whole line as one piece, like the Scale and Rotate of a sprite effect: graphs over the track's own way of moving (the top of the graph is its start, the bottom its end), Scale in percent, Rotate in degrees (a positive number turns the line counter-clockwise). The line grows and turns about its middle: every letter moves round the middle of the line and turns and grows with it, and the whole line shares one turn and size slot. They combine with the Letters looks: the looks move the letters first, then the line's Scale and Rotate carry the moved letters round the middle. A letter that a look turns or sizes (Spin, Pop, Heartbeat, Jelly, a Letter size) turns and grows by that and by the line's turn and size, so the turns add up and the sizes multiply (with Scale individually the width and the height of a letter that is also turned by a look are combined as if the look turned it first: for a plain Scale or Rotate that makes no difference). A line too long to split into letters (it must fit the same number of letters a turned draw_text_warped line can) is drawn plainly, as the Letters looks are.
Turning and resizing use the console's turn and size slots. The Game Boy Advance has only 32 of them for the whole screen, and everything else that turns or resizes (an object with an angle or a scale, a cutscene's big text) uses them too. A letter that is turned or resized takes one for as long as it is turned or resized; letters that look exactly the same share one, so Heartbeat uses just one however long the line is. Spin and Jelly take one for each letter, and Pop takes one for each letter that is still growing, so they suit short words. If the slots run out, the letters that did not get one are simply drawn as they are, not turned or resized, and nothing breaks. A game that does not use these four looks does not pay anything for them.
An effect's clock runs while you keep calling text_effect_start for it, once a frame. If a frame passes in which you did not call it, the effect starts over the next time. So to make a hit flash, call text_effect_start for a few frames, then stop calling it.
Blocks and See-through are different from the other three. The Game Boy Advance has one block size and one see-through level for the whole screen. So only one effect with a Blocks or See-through track (a text effect or a sprite effect) can play at a time; a second one is refused (a development build stops with a message that says so). It replaces an overlay_start effect of your own while it plays.
text_effect_start, or after text_effect_stop, keep the font's own colors, even in the same font.draw_text_warped line has. A longer line is not moved letter by letter.text_effect_strength sets how strong the whole effect plays (0 to 100 percent) and text_effect_speed how fast its looks go (0 to 400 percent); both can change from any event, a Step event included, and the effect follows smoothly.An effect has up to four tracks, each with its own way of moving (standing still, a pulse that plays once, repeats or holds). Tint mixes the font’s colors toward a color or a palette of the project: the words get a palette of their own while the amount is not 0 (one of the console’s 16 sprite palettes), and a line drawn before text_effect_start or after text_effect_stop in the same font keeps the font’s colors. Letters moves the letters one by one: a Wave sends a sine up and down the line, Shake jitters every letter. Blocks and See-through are the screen’s, not the words’: the console has ONE block size and ONE see-through level for the whole screen, so only one text effect (or sprite effect) with either can play at a time, and it replaces an overlay_start effect of your own. A line drawn with a text effect is built again every frame, like words that change every frame, and at most 16 such lines are dressed in one frame. The effect’s clock runs while text_effect_start is called for it, and starts over the next time after a frame in which it was not. A game that never plays a text effect has none of this in its cartridge.